package com.zjtiobaco.order;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.zjtobacco.Constants;
import com.zjtobacco.domain.Goods;

public class InStoreOrderHandler {
	public static void main(String[] args) {
		InStoreOrder order = new InStoreOrder();
		order.setOrderId("20110601003");
		order.setOrderDate("20110601");
		order.setPlatform("2-1");
		order.setCarNumber("浙A87287");

		List<Goods> goodsList = new ArrayList<Goods>();
		Goods goods1 = new Goods();
		goods1.setName("利群(新版)");
		goods1.setType(Constants.TYPE_CORE);
		goodsList.add(goods1);
		order.setGoodsList(goodsList);
		List<Integer> amountList = new ArrayList<Integer>();
		amountList.add(new Integer(2700));
		order.setAmountList(amountList);

		System.out.println(order.toString());
		// 楼层的current capacity
		Map<String, List<Capacity>> capacities = new HashMap<String, List<Capacity>>();
		{
			List<Capacity> capacityList = new ArrayList<Capacity>();
			capacityList.add(new Capacity(Constants.TYPE_CORE, 2000));
			capacityList.add(new Capacity(Constants.TYPE_LINK, 2000));
			capacityList.add(new Capacity(Constants.TYPE_NORMAL, 100));
			capacities.put("001", capacityList);
		}
		{
			List<Capacity> capacityList = new ArrayList<Capacity>();
			capacityList.add(new Capacity(Constants.TYPE_CORE, 3000));
			capacityList.add(new Capacity(Constants.TYPE_LINK, 200));
			capacities.put("002", capacityList);
		}
	}
}
